package cn.lili.controller.user.union;

import cn.lili.common.utils.ResultUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.entity.dos.UnionLog;
import cn.lili.modules.union.service.UnionLogService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "工会日志接口")
@RestController
@RequestMapping("/user/unionLog")
@RequiredArgsConstructor
@Validated
public class UnionLogController {

    private final UnionLogService unionLogService;

    @ApiOperation(value = "获取工会日志分页列表")
    @GetMapping
    public ResultMessage<Page<UnionLog>> getByPage(UnionLog unionLog, PageVO page) {
        return ResultUtil.data(unionLogService.getByPage(unionLog, page));
    }
}
